class A:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: F = None
        self.o: G = None
        self.q: H = None
        self.w: B = None
        self.r: F = None
        self.z: B = None
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.y: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: H = None
        self.o: B = None
        self.txt = txt

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

k = A("k")
a = B("a")
n = C("n")
i = D("i")
b = E("b")
l = F("l")
c = G("c")
m = H("m")
j = D("j")

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.y: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: H = None
        self.o: B = None
        self.txt = txt

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

k = A("k")
a = B("a")
n = C("n")
i = D("i")
b = E("b")
l = F("l")
c = G("c")
m = H("m")
j = D("j")

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