class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: B = None
        self.p: F = None
        self.z: E = None
        self.y: C = None
        self.v: G = None
        self.r: F = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: D = None
        self.t: G = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: D = None
        self.t: G = None
        self.txt = txt

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

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