class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: A = None
        self.v: E = None
        self.t: B = None
        self.x: F = None
        self.u: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: E = None
        self.t: C = None
        self.x: F = None
        self.o: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: A = None
        self.r: E = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: F = None
        self.w: A = None
        self.x: F = None
        self.z: E = None
        self.r: A = None
        self.txt = txt

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

g = A("g")
a = B("a")
j = C("j")
l = D("l")
i = E("i")
h = F("h")
f = B("f")
n = E("n")
d = A("d")
e = C("e")

g.r = l
g.u = l
g.y = d
g.v = i
g.t = a
g.x = h
a.z = i
j.q = h
j.x = h
j.y = n
j.t = e
j.o = e
l.w = d
l.x = g
l.r = i
l.o = e
i.t = l
i.v = h
i.x = h
i.w = d
i.z = n
i.r = g
h.x = a
h.y = d
f.z = n
n.t = l
n.v = h
n.x = h
n.w = g
n.r = g
n.z = i
d.r = l
d.u = l
d.y = g
d.v = n
d.t = a
d.x = h
e.q = h
e.x = h
e.y = i
e.t = j
e.o = j
assert i.r.r.r.txt == "
class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: A = None
        self.v: E = None
        self.t: B = None
        self.x: F = None
        self.u: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: E = None
        self.t: C = None
        self.x: F = None
        self.o: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: A = None
        self.r: E = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: F = None
        self.w: A = None
        self.x: F = None
        self.z: E = None
        self.r: A = None
        self.txt = txt

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

g = A("g")
a = B("a")
j = C("j")
l = D("l")
i = E("i")
h = F("h")
f = B("f")
n = E("n")
d = A("d")
e = C("e")

g.r = l
g.u = l
g.y = d
g.v = i
g.t = a
g.x = h
a.z = i
j.q = h
j.x = h
j.y = n
j.t = e
j.o = e
l.w = d
l.x = g
l.r = i
l.o = e
i.t = l
i.v = h
i.x = h
i.w = d
i.z = n
i.r = g
h.x = a
h.y = d
f.z = n
n.t = l
n.v = h
n.x = h
n.w = g
n.r = g
n.z = i
d.r = l
d.u = l
d.y = g
d.v = n
d.t = a
d.x = h
e.q = h
e.x = h
e.y = i
e.t = j
e.o = j
assert i.r.r.r.txt == "i"