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

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: E = None
        self.v: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: E = None
        self.t: E = None
        self.w: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: E = None
        self.v: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: E = None
        self.t: E = None
        self.w: A = None
        self.txt = txt

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

a.u = e
a.w = k
a.t = b
l.w = k
d.p = l
d.u = k
d.v = e
c.x = i
c.u = a
c.w = a
c.z = b
c.o = d
c.r = l
k.o = e
k.r = f
k.z = i
b.o = d
b.p = i
b.t = i
b.w = a
i.o = e
i.r = c
i.z = k
g.p = e
g.u = k
g.v = l
f.x = k
f.u = a
f.w = a
f.z = b
f.o = g
f.r = e
e.w = i
assert i.r.o.p.w.r.txt == "f"