class A:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: B = None
        self.q: E = None
        self.s: B = None
        self.o: E = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

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