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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: F = None
        self.y: A = None
        self.p: D = None
        self.r: F = None
        self.w: C = None
        self.txt = txt

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

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

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

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

l = A("l")
e = B("e")
g = C("g")
m = D("m")
n = E("n")
i = F("i")
h = D("h")
c = B("c")

l.u = n
l.x = c
e.q = l
e.y = l
e.o = i
e.r = i
e.p = h
e.w = g
g.r = m
m.x = h
m.s = h
m.q = i
m.t = i
m.z = l
m.r = c
n.u = l
n.x = m
i.p = c
i.t = c
i.u = l
i.q = h
h.x = m
h.s = m
h.q = i
h.t = i
h.z = l
h.r = c
c.q = l
c.y = l
c.o = i
c.r = i
c.p = h
c.w = g
assert h.x.s.r.w.r.q.u.u.txt == "
class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: F = None
        self.y: A = None
        self.p: D = None
        self.r: F = None
        self.w: C = None
        self.txt = txt

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

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

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

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

l = A("l")
e = B("e")
g = C("g")
m = D("m")
n = E("n")
i = F("i")
h = D("h")
c = B("c")

l.u = n
l.x = c
e.q = l
e.y = l
e.o = i
e.r = i
e.p = h
e.w = g
g.r = m
m.x = h
m.s = h
m.q = i
m.t = i
m.z = l
m.r = c
n.u = l
n.x = m
i.p = c
i.t = c
i.u = l
i.q = h
h.x = m
h.s = m
h.q = i
h.t = i
h.z = l
h.r = c
c.q = l
c.y = l
c.o = i
c.r = i
c.p = h
c.w = g
assert h.x.s.r.w.r.q.u.u.txt == "n"