class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: A = None
        self.s: D = None
        self.r: C = None
        self.t: D = None
        self.o: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: D = None
        self.q: B = None
        self.v: E = None
        self.s: E = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: F = None
        self.t: G = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: A = None
        self.s: D = None
        self.r: C = None
        self.t: D = None
        self.o: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: D = None
        self.q: B = None
        self.v: E = None
        self.s: E = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: F = None
        self.t: G = None
        self.txt = txt

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

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

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