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

class B:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: F = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: B = None
        self.r: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: G = None
        self.q: C = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: E = None
        self.u: D = None
        self.w: B = None
        self.v: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: C = None
        self.s: F = None
        self.v: C = None
        self.t: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: F = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: B = None
        self.r: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: G = None
        self.q: C = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: E = None
        self.u: D = None
        self.w: B = None
        self.v: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: C = None
        self.s: F = None
        self.v: C = None
        self.t: G = None
        self.txt = txt

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

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