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

class B:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: F = None
        self.t: F = None
        self.x: D = None
        self.z: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: D = None
        self.p: D = None
        self.u: C = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

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

k = A("k")
d = B("d")
h = C("h")
a = D("a")
f = E("f")
j = F("j")
m = D("m")
b = E("b")
n = B("n")

k.u = j
k.o = j
k.y = h
k.v = n
d.u = n
d.s = j
d.t = j
d.x = m
d.z = h
h.q = d
h.v = a
h.s = j
a.t = k
a.x = m
a.p = m
a.u = h
a.q = b
f.p = j
j.t = k
m.t = k
m.x = a
m.p = a
m.u = h
m.q = f
b.p = j
n.u = d
n.s = j
n.t = j
n.x = m
n.z = h
assert b.p.t.y.q.s.t.u.t.txt == "
class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: C = None
        self.v: B = None
        self.o: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: F = None
        self.t: F = None
        self.x: D = None
        self.z: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: D = None
        self.p: D = None
        self.u: C = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

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

k = A("k")
d = B("d")
h = C("h")
a = D("a")
f = E("f")
j = F("j")
m = D("m")
b = E("b")
n = B("n")

k.u = j
k.o = j
k.y = h
k.v = n
d.u = n
d.s = j
d.t = j
d.x = m
d.z = h
h.q = d
h.v = a
h.s = j
a.t = k
a.x = m
a.p = m
a.u = h
a.q = b
f.p = j
j.t = k
m.t = k
m.x = a
m.p = a
m.u = h
m.q = f
b.p = j
n.u = d
n.s = j
n.t = j
n.x = m
n.z = h
assert b.p.t.y.q.s.t.u.t.txt == "k"