class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: C = None
        self.u: F = None
        self.z: A = None
        self.r: E = None
        self.w: D = None
        self.v: B = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: B = None
        self.p: C = None
        self.z: C = None
        self.x: G = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: C = None
        self.v: A = None
        self.o: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: C = None
        self.u: F = None
        self.z: A = None
        self.r: E = None
        self.w: D = None
        self.v: B = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: B = None
        self.p: C = None
        self.z: C = None
        self.x: G = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: C = None
        self.v: A = None
        self.o: D = None
        self.txt = txt

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

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

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

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