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

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: B = None
        self.q: D = None
        self.z: D = None
        self.w: D = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: B = None
        self.q: D = None
        self.z: D = None
        self.w: D = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

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