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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: E = None
        self.u: E = None
        self.r: F = None
        self.p: D = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: E = None
        self.u: E = None
        self.r: F = None
        self.p: D = None
        self.txt = txt

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

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

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

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

d.z = f
d.q = h
d.x = k
d.t = k
f.v = i
f.t = c
b.v = h
b.o = h
b.u = h
b.r = k
b.p = m
i.u = h
i.r = h
h.x = d
h.v = a
h.s = b
k.t = h
k.x = h
k.o = b
k.y = c
k.s = a
k.w = d
l.v = h
l.o = h
l.u = h
l.r = k
l.p = c
a.u = h
a.r = h
c.u = h
c.r = h
m.u = h
m.r = h
assert h.v.u.s.p.txt == "m"