class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: B = None
        self.s: B = None
        self.y: B = None
        self.t: A = None
        self.q: H = None
        self.w: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: E = None
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: C = None
        self.s: H = None
        self.t: B = None
        self.r: D = None
        self.u: C = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.v: B = None
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: F = None
        self.p: C = None
        self.u: F = None
        self.z: E = None
        self.q: H = None
        self.r: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: G = None
        self.r: F = None
        self.x: A = None
        self.u: G = None
        self.y: E = None
        self.txt = txt

k = A("k")
l = B("l")
f = C("f")
h = D("h")
e = E("e")
n = F("n")
i = G("i")
a = H("a")
j = B("j")
g = G("g")

k.r = e
k.y = n
l.z = e
l.u = j
l.s = j
l.y = j
l.t = k
l.q = a
l.w = f
f.s = a
f.t = e
f.y = e
h.x = a
e.o = k
e.p = k
e.x = f
e.u = f
e.s = a
e.t = j
e.r = h
n.s = h
n.v = l
n.z = e
i.y = g
i.w = n
i.u = n
i.p = f
i.z = e
i.q = a
i.r = l
a.v = n
a.r = n
a.o = i
a.x = k
a.u = g
a.y = e
j.z = e
j.u = l
j.s = l
j.y = l
j.t = k
j.q = a
j.w = f
g.y = i
g.w = n
g.u = n
g.p = f
g.z = e
g.q = a
g.r = j
assert h.x.x.y.v.t.y.v.z.t.txt == "
class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: B = None
        self.s: B = None
        self.y: B = None
        self.t: A = None
        self.q: H = None
        self.w: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: E = None
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: C = None
        self.s: H = None
        self.t: B = None
        self.r: D = None
        self.u: C = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.v: B = None
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: F = None
        self.p: C = None
        self.u: F = None
        self.z: E = None
        self.q: H = None
        self.r: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: G = None
        self.r: F = None
        self.x: A = None
        self.u: G = None
        self.y: E = None
        self.txt = txt

k = A("k")
l = B("l")
f = C("f")
h = D("h")
e = E("e")
n = F("n")
i = G("i")
a = H("a")
j = B("j")
g = G("g")

k.r = e
k.y = n
l.z = e
l.u = j
l.s = j
l.y = j
l.t = k
l.q = a
l.w = f
f.s = a
f.t = e
f.y = e
h.x = a
e.o = k
e.p = k
e.x = f
e.u = f
e.s = a
e.t = j
e.r = h
n.s = h
n.v = l
n.z = e
i.y = g
i.w = n
i.u = n
i.p = f
i.z = e
i.q = a
i.r = l
a.v = n
a.r = n
a.o = i
a.x = k
a.u = g
a.y = e
j.z = e
j.u = l
j.s = l
j.y = l
j.t = k
j.q = a
j.w = f
g.y = i
g.w = n
g.u = n
g.p = f
g.z = e
g.q = a
g.r = j
assert h.x.x.y.v.t.y.v.z.t.txt == "j"