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

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

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

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

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

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

f = A("f")
n = B("n")
e = C("e")
c = D("c")
l = E("l")
g = F("g")
i = A("i")
k = F("k")
d = C("d")

f.x = i
f.u = i
f.z = n
f.o = n
n.x = i
n.t = c
e.r = c
e.u = n
e.o = d
e.z = l
c.u = e
c.s = e
c.v = k
c.r = k
c.q = i
c.w = n
l.w = d
l.r = g
l.x = n
g.v = i
g.q = l
i.x = f
i.u = f
i.z = n
i.o = n
k.v = f
k.q = l
d.r = c
d.u = n
d.o = e
d.z = l
assert d.u.t.u.r.v.q.x.txt == "
class A:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: B = None
        self.o: B = None
        self.u: A = None
        self.txt = txt

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

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

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

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

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

f = A("f")
n = B("n")
e = C("e")
c = D("c")
l = E("l")
g = F("g")
i = A("i")
k = F("k")
d = C("d")

f.x = i
f.u = i
f.z = n
f.o = n
n.x = i
n.t = c
e.r = c
e.u = n
e.o = d
e.z = l
c.u = e
c.s = e
c.v = k
c.r = k
c.q = i
c.w = n
l.w = d
l.r = g
l.x = n
g.v = i
g.q = l
i.x = f
i.u = f
i.z = n
i.o = n
k.v = f
k.q = l
d.r = c
d.u = n
d.o = e
d.z = l
assert d.u.t.u.r.v.q.x.txt == "n"