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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: A = None
        self.x: C = None
        self.o: A = None
        self.u: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: F = None
        self.t: B = None
        self.y: A = None
        self.s: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.y: A = None
        self.u: E = None
        self.p: E = None
        self.r: H = None
        self.z: G = None
        self.w: A = None
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: C = None
        self.q: G = None
        self.x: B = None
        self.z: C = None
        self.p: A = None
        self.t: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: F = None
        self.p: H = None
        self.u: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: A = None
        self.x: C = None
        self.o: A = None
        self.u: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: F = None
        self.t: B = None
        self.y: A = None
        self.s: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.y: A = None
        self.u: E = None
        self.p: E = None
        self.r: H = None
        self.z: G = None
        self.w: A = None
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: C = None
        self.q: G = None
        self.x: B = None
        self.z: C = None
        self.p: A = None
        self.t: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: F = None
        self.p: H = None
        self.u: A = None
        self.txt = txt

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

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