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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: H = None
        self.p: H = None
        self.z: H = None
        self.o: H = None
        self.s: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: F = None
        self.z: H = None
        self.o: H = None
        self.x: E = None
        self.v: D = None
        self.p: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: H = None
        self.p: H = None
        self.z: H = None
        self.o: H = None
        self.s: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: F = None
        self.z: H = None
        self.o: H = None
        self.x: E = None
        self.v: D = None
        self.p: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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