class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: G = None
        self.u: F = None
        self.o: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: F = None
        self.u: E = None
        self.q: F = None
        self.x: F = None
        self.txt = txt

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

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

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

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

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

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

g.x = h
g.o = h
g.y = m
g.u = c
h.s = c
h.z = c
h.q = c
h.x = c
h.u = a
f.v = h
j.r = a
a.s = c
a.w = e
a.z = m
a.p = m
a.t = j
a.q = g
a.o = f
c.v = h
c.o = a
c.x = a
c.p = e
c.z = m
c.q = g
c.t = g
m.v = a
m.q = f
e.v = h
assert g.x.q.v.u.s.z.q.v.txt == "
class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: G = None
        self.u: F = None
        self.o: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: F = None
        self.u: E = None
        self.q: F = None
        self.x: F = None
        self.txt = txt

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

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

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

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

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

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

g.x = h
g.o = h
g.y = m
g.u = c
h.s = c
h.z = c
h.q = c
h.x = c
h.u = a
f.v = h
j.r = a
a.s = c
a.w = e
a.z = m
a.p = m
a.t = j
a.q = g
a.o = f
c.v = h
c.o = a
c.x = a
c.p = e
c.z = m
c.q = g
c.t = g
m.v = a
m.q = f
e.v = h
assert g.x.q.v.u.s.z.q.v.txt == "h"