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

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.r: G = None
        self.x: E = None
        self.o: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: 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.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: C = None
        self.p: C = None
        self.z: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: G = None
        self.v: E = None
        self.txt = txt

e = A("e")
n = B("n")
l = C("l")
c = D("c")
a = E("a")
h = F("h")
m = G("m")
j = H("j")

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

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.r: G = None
        self.x: E = None
        self.o: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: 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.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: C = None
        self.p: C = None
        self.z: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: G = None
        self.v: E = None
        self.txt = txt

e = A("e")
n = B("n")
l = C("l")
c = D("c")
a = E("a")
h = F("h")
m = G("m")
j = H("j")

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