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

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

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

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

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

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

n = A("n")
k = B("k")
b = C("b")
j = D("j")
l = E("l")
e = F("e")
a = C("a")
c = B("c")
d = E("d")

n.t = l
n.o = e
n.v = e
n.u = j
k.s = n
k.o = d
b.x = l
j.x = k
j.p = k
j.r = n
j.o = c
l.w = n
l.o = c
l.z = d
l.q = k
l.x = k
e.v = d
e.t = d
e.o = l
e.x = k
e.w = a
a.x = d
c.s = n
c.o = l
d.w = n
d.o = c
d.q = c
d.x = c
d.z = l
assert d.w.t.z.w.t.x.s.t.txt == "
class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: F = None
        self.u: D = None
        self.v: F = None
        self.txt = txt

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

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

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

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

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

n = A("n")
k = B("k")
b = C("b")
j = D("j")
l = E("l")
e = F("e")
a = C("a")
c = B("c")
d = E("d")

n.t = l
n.o = e
n.v = e
n.u = j
k.s = n
k.o = d
b.x = l
j.x = k
j.p = k
j.r = n
j.o = c
l.w = n
l.o = c
l.z = d
l.q = k
l.x = k
e.v = d
e.t = d
e.o = l
e.x = k
e.w = a
a.x = d
c.s = n
c.o = l
d.w = n
d.o = c
d.q = c
d.x = c
d.z = l
assert d.w.t.z.w.t.x.s.t.txt == "l"