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

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: C = None
        self.s: C = None
        self.u: B = None
        self.v: F = None
        self.txt = txt

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

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

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

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

i.o = c
e.z = i
l.o = n
l.y = f
l.s = f
l.u = e
l.v = g
h.v = n
h.r = l
h.s = e
h.q = b
n.y = j
n.t = i
c.x = b
c.r = e
c.v = h
c.o = h
j.x = n
j.r = e
j.v = h
j.o = h
g.x = n
g.r = e
g.v = h
g.o = h
f.o = b
f.y = l
f.s = l
f.u = e
f.v = c
b.y = c
b.t = i
assert i.o.r.z.txt == "
class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: C = None
        self.s: C = None
        self.u: B = None
        self.v: F = None
        self.txt = txt

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

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

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

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

i.o = c
e.z = i
l.o = n
l.y = f
l.s = f
l.u = e
l.v = g
h.v = n
h.r = l
h.s = e
h.q = b
n.y = j
n.t = i
c.x = b
c.r = e
c.v = h
c.o = h
j.x = n
j.r = e
j.v = h
j.o = h
g.x = n
g.r = e
g.v = h
g.o = h
f.o = b
f.y = l
f.s = l
f.u = e
f.v = c
b.y = c
b.t = i
assert i.o.r.z.txt == "i"