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

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

class C:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: A = None
        self.z: D = None
        self.x: A = None
        self.txt = txt

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

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

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

h = A("h")
j = B("j")
m = C("m")
d = D("d")
b = E("b")
l = F("l")
k = C("k")
i = C("i")
g = F("g")
n = B("n")

h.w = l
h.q = d
h.u = b
h.t = m
j.w = b
j.o = l
j.r = h
j.t = d
m.w = k
m.s = h
m.x = h
m.z = d
d.q = l
d.s = l
d.y = n
d.x = k
b.x = d
l.u = g
l.t = h
k.w = m
k.s = h
k.x = h
k.z = d
i.w = k
i.s = h
i.x = h
i.z = d
g.u = l
g.t = h
n.w = b
n.o = l
n.r = h
n.t = d
assert k.s.t.z.s.u.u.u.u.t.txt == "
class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: D = None
        self.u: E = None
        self.t: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: A = None
        self.z: D = None
        self.x: A = None
        self.txt = txt

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

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

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

h = A("h")
j = B("j")
m = C("m")
d = D("d")
b = E("b")
l = F("l")
k = C("k")
i = C("i")
g = F("g")
n = B("n")

h.w = l
h.q = d
h.u = b
h.t = m
j.w = b
j.o = l
j.r = h
j.t = d
m.w = k
m.s = h
m.x = h
m.z = d
d.q = l
d.s = l
d.y = n
d.x = k
b.x = d
l.u = g
l.t = h
k.w = m
k.s = h
k.x = h
k.z = d
i.w = k
i.s = h
i.x = h
i.z = d
g.u = l
g.t = h
n.w = b
n.o = l
n.r = h
n.t = d
assert k.s.t.z.s.u.u.u.u.t.txt == "h"