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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: B = None
        self.s: G = None
        self.y: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: B = None
        self.s: G = None
        self.y: D = None
        self.txt = txt

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

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

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