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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: A = None
        self.q: F = None
        self.txt = txt

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

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

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

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

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

n.t = b
b.z = f
b.u = n
b.q = d
k.s = e
k.w = n
k.z = a
k.r = b
k.t = d
k.u = d
j.r = n
j.z = h
a.z = d
a.s = d
a.p = i
a.r = h
d.q = h
d.y = a
d.u = k
d.s = e
d.w = n
i.z = d
i.s = d
i.p = a
i.r = h
h.z = j
h.u = n
h.q = d
e.r = n
e.z = b
f.r = n
f.z = h
assert d.y.z.u.txt == "
class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: A = None
        self.q: F = None
        self.txt = txt

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

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

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

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

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

n.t = b
b.z = f
b.u = n
b.q = d
k.s = e
k.w = n
k.z = a
k.r = b
k.t = d
k.u = d
j.r = n
j.z = h
a.z = d
a.s = d
a.p = i
a.r = h
d.q = h
d.y = a
d.u = k
d.s = e
d.w = n
i.z = d
i.s = d
i.p = a
i.r = h
h.z = j
h.u = n
h.q = d
e.r = n
e.z = b
f.r = n
f.z = h
assert d.y.z.u.txt == "k"