class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: D = None
        self.s: F = None
        self.o: F = None
        self.q: B = None
        self.w: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: B = None
        self.x: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: E = None
        self.y: D = None
        self.p: D = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: E = None
        self.txt = txt

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

e.z = f
e.q = f
e.u = c
e.s = d
e.o = d
e.w = l
f.o = g
f.z = g
f.s = e
f.p = e
f.u = c
f.x = l
g.w = f
g.s = b
g.o = n
h.z = g
h.v = f
h.x = f
n.p = h
j.z = h
j.y = h
j.q = h
j.o = n
j.p = c
b.q = h
b.p = n
d.z = h
d.p = h
d.q = h
d.o = n
d.y = c
c.z = g
c.v = f
c.x = f
l.q = c
l.p = n
assert g.w.u.x.p.z.z.o.p.z.txt == "
class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: D = None
        self.s: F = None
        self.o: F = None
        self.q: B = None
        self.w: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: B = None
        self.x: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: E = None
        self.y: D = None
        self.p: D = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: E = None
        self.txt = txt

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

e.z = f
e.q = f
e.u = c
e.s = d
e.o = d
e.w = l
f.o = g
f.z = g
f.s = e
f.p = e
f.u = c
f.x = l
g.w = f
g.s = b
g.o = n
h.z = g
h.v = f
h.x = f
n.p = h
j.z = h
j.y = h
j.q = h
j.o = n
j.p = c
b.q = h
b.p = n
d.z = h
d.p = h
d.q = h
d.o = n
d.y = c
c.z = g
c.v = f
c.x = f
l.q = c
l.p = n
assert g.w.u.x.p.z.z.o.p.z.txt == "g"