class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: G = None
        self.p: E = None
        self.t: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: A = None
        self.x: F = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: C = None
        self.z: F = None
        self.p: C = None
        self.t: A = None
        self.w: E = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: D = None
        self.q: C = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: E = None
        self.w: E = None
        self.y: F = None
        self.z: C = None
        self.q: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: A = None
        self.x: F = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: C = None
        self.z: F = None
        self.p: C = None
        self.t: A = None
        self.w: E = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: D = None
        self.q: C = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: E = None
        self.w: E = None
        self.y: F = None
        self.z: C = None
        self.q: F = None
        self.txt = txt

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

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

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