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

class B:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: B = None
        self.y: B = None
        self.w: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: F = None
        self.y: H = None
        self.t: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: B = None
        self.y: B = None
        self.w: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: F = None
        self.y: H = None
        self.t: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: F = None
        self.txt = txt

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

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