class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: G = None
        self.o: B = None
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: C = None
        self.q: A = None
        self.w: D = None
        self.p: D = None
        self.x: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: G = None
        self.t: G = None
        self.w: D = None
        self.r: A = None
        self.v: C = None
        self.txt = txt

l = A("l")
h = B("h")
j = C("j")
m = D("m")
i = E("i")
n = F("n")
f = G("f")
k = G("k")
g = G("g")

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

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: G = None
        self.o: B = None
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: C = None
        self.q: A = None
        self.w: D = None
        self.p: D = None
        self.x: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: G = None
        self.t: G = None
        self.w: D = None
        self.r: A = None
        self.v: C = None
        self.txt = txt

l = A("l")
h = B("h")
j = C("j")
m = D("m")
i = E("i")
n = F("n")
f = G("f")
k = G("k")
g = G("g")

l.p = i
h.v = n
h.o = l
h.r = i
j.z = i
j.s = i
j.u = f
j.o = h
m.t = h
m.y = k
i.u = j
n.z = j
n.y = j
n.q = l
n.w = m
n.p = m
n.x = h
f.u = j
f.v = j
f.x = k
f.t = g
f.w = m
f.r = l
k.u = j
k.v = j
k.x = g
k.t = f
k.w = m
k.r = l
g.u = j
g.v = j
g.x = f
g.t = k
g.w = m
g.r = l
assert j.o.o.p.u.z.u.o.txt == "h"