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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: F = None
        self.x: F = None
        self.t: D = None
        self.o: A = None
        self.p: C = None
        self.u: C = None
        self.s: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: C = None
        self.u: B = None
        self.r: C = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: C = None
        self.u: H = None
        self.s: H = None
        self.z: A = None
        self.v: F = None
        self.txt = txt

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

m = A("m")
d = B("d")
e = C("e")
h = D("h")
l = E("l")
b = F("b")
k = G("k")
i = H("i")
j = A("j")

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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: F = None
        self.x: F = None
        self.t: D = None
        self.o: A = None
        self.p: C = None
        self.u: C = None
        self.s: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: C = None
        self.u: B = None
        self.r: C = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: C = None
        self.u: H = None
        self.s: H = None
        self.z: A = None
        self.v: F = None
        self.txt = txt

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

m = A("m")
d = B("d")
e = C("e")
h = D("h")
l = E("l")
b = F("b")
k = G("k")
i = H("i")
j = A("j")

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