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

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: G = None
        self.txt = txt

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

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

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

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

i = A("i")
f = B("f")
l = C("l")
g = D("g")
d = E("d")
c = F("c")
e = G("e")
b = F("b")
h = F("h")
a = E("a")

i.z = e
i.q = e
i.r = f
i.u = f
i.s = g
f.r = l
f.q = d
l.s = f
l.r = e
g.v = h
g.u = d
d.z = e
d.v = e
d.y = e
d.o = c
d.r = c
d.p = l
d.t = f
c.w = f
c.t = g
c.o = a
e.p = i
e.r = g
b.w = f
b.t = g
b.o = d
h.w = f
h.t = g
h.o = a
a.z = e
a.v = e
a.y = e
a.o = c
a.r = c
a.p = l
a.t = f
assert i.r.r.r.txt == "
class A:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: B = None
        self.q: G = None
        self.u: B = None
        self.s: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: G = None
        self.txt = txt

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

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

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

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

i = A("i")
f = B("f")
l = C("l")
g = D("g")
d = E("d")
c = F("c")
e = G("e")
b = F("b")
h = F("h")
a = E("a")

i.z = e
i.q = e
i.r = f
i.u = f
i.s = g
f.r = l
f.q = d
l.s = f
l.r = e
g.v = h
g.u = d
d.z = e
d.v = e
d.y = e
d.o = c
d.r = c
d.p = l
d.t = f
c.w = f
c.t = g
c.o = a
e.p = i
e.r = g
b.w = f
b.t = g
b.o = d
h.w = f
h.t = g
h.o = a
a.z = e
a.v = e
a.y = e
a.o = c
a.r = c
a.p = l
a.t = f
assert i.r.r.r.txt == "e"