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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: G = None
        self.y: B = None
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: E = None
        self.y: F = None
        self.s: A = None
        self.t: F = None
        self.v: B = None
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: C = None
        self.p: B = None
        self.y: A = None
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: B = None
        self.z: A = None
        self.t: B = None
        self.o: G = None
        self.s: A = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: G = None
        self.w: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: G = None
        self.y: B = None
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: E = None
        self.y: F = None
        self.s: A = None
        self.t: F = None
        self.v: B = None
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: C = None
        self.p: B = None
        self.y: A = None
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: B = None
        self.z: A = None
        self.t: B = None
        self.o: G = None
        self.s: A = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: G = None
        self.w: D = None
        self.txt = txt

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

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