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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: G = None
        self.t: B = None
        self.v: G = None
        self.q: G = None
        self.txt = txt

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

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

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

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

j = A("j")
f = B("f")
g = C("g")
h = D("h")
d = E("d")
e = F("e")
a = G("a")
k = A("k")
n = G("n")
c = A("c")

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: G = None
        self.t: B = None
        self.v: G = None
        self.q: G = None
        self.txt = txt

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

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

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

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

j = A("j")
f = B("f")
g = C("g")
h = D("h")
d = E("d")
e = F("e")
a = G("a")
k = A("k")
n = G("n")
c = A("c")

j.w = d
j.q = d
f.x = g
f.p = n
g.w = j
g.z = a
g.t = f
g.v = n
g.q = n
h.v = d
d.o = h
e.w = f
e.o = j
e.z = g
e.t = a
e.v = d
e.u = h
a.p = e
a.y = e
a.t = n
a.o = j
a.x = j
a.q = k
k.w = d
k.q = d
n.p = e
n.y = e
n.t = a
n.o = j
n.q = j
n.x = c
c.w = d
c.q = d
assert j.w.o.v.o.txt == "h"