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

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: B = None
        self.y: C = None
        self.r: D = None
        self.v: F = None
        self.z: F = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: B = None
        self.y: C = None
        self.r: D = None
        self.v: F = None
        self.z: F = None
        self.txt = txt

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

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

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

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

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