class A:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: C = None
        self.q: B = None
        self.z: C = None
        self.p: H = None
        self.o: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: H = None
        self.z: C = None
        self.y: A = None
        self.r: A = None
        self.t: E = None
        self.q: F = None
        self.s: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: D = None
        self.q: G = None
        self.w: C = None
        self.z: D = None
        self.y: E = None
        self.u: H = None
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: E = None
        self.v: D = None
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: A = None
        self.txt = txt

a = A("a")
f = B("f")
d = C("d")
k = D("k")
b = E("b")
e = F("e")
n = G("n")
c = H("c")
i = D("i")
j = A("j")

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

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

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: H = None
        self.z: C = None
        self.y: A = None
        self.r: A = None
        self.t: E = None
        self.q: F = None
        self.s: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: D = None
        self.q: G = None
        self.w: C = None
        self.z: D = None
        self.y: E = None
        self.u: H = None
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: E = None
        self.v: D = None
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: A = None
        self.txt = txt

a = A("a")
f = B("f")
d = C("d")
k = D("k")
b = E("b")
e = F("e")
n = G("n")
c = H("c")
i = D("i")
j = A("j")

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