class A:
    def __init__(self, txt: str):
        self.q: J = None
        self.y: E = None
        self.w: B = None
        self.x: J = None
        self.p: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: A = None
        self.v: J = None
        self.p: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: B = None
        self.v: C = None
        self.q: C = None
        self.o: J = None
        self.u: I = None
        self.y: H = None
        self.x: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: I = None
        self.v: J = None
        self.q: J = None
        self.t: D = None
        self.r: J = None
        self.s: D = None
        self.o: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: J = None
        self.s: B = None
        self.v: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: G = None
        self.w: C = None
        self.t: D = None
        self.r: C = None
        self.u: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: C = None
        self.z: D = None
        self.x: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

j = A("j")
d = B("d")
k = C("k")
l = D("l")
a = E("a")
b = F("b")
e = G("e")
c = H("c")
h = I("h")
f = J("f")

j.q = f
j.x = f
j.y = a
j.w = d
j.p = c
d.w = l
d.r = j
d.v = f
d.p = h
k.z = h
l.r = c
l.y = c
l.w = d
l.v = k
l.q = k
l.o = f
l.u = h
l.x = j
a.s = b
a.y = l
b.y = l
b.t = l
b.s = l
b.x = h
b.v = f
b.q = f
b.r = f
b.o = j
e.p = d
e.s = d
e.y = f
e.v = a
c.v = a
c.y = e
c.w = k
c.r = k
c.t = l
c.u = d
h.t = e
h.p = k
h.z = l
h.x = j
f.t = h
assert e.y.t.p.z.z.u.z.w.v.t.txt == "
class A:
    def __init__(self, txt: str):
        self.q: J = None
        self.y: E = None
        self.w: B = None
        self.x: J = None
        self.p: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: A = None
        self.v: J = None
        self.p: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: B = None
        self.v: C = None
        self.q: C = None
        self.o: J = None
        self.u: I = None
        self.y: H = None
        self.x: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: I = None
        self.v: J = None
        self.q: J = None
        self.t: D = None
        self.r: J = None
        self.s: D = None
        self.o: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: J = None
        self.s: B = None
        self.v: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: G = None
        self.w: C = None
        self.t: D = None
        self.r: C = None
        self.u: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: C = None
        self.z: D = None
        self.x: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

j = A("j")
d = B("d")
k = C("k")
l = D("l")
a = E("a")
b = F("b")
e = G("e")
c = H("c")
h = I("h")
f = J("f")

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