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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: B = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: F = None
        self.z: F = None
        self.t: G = None
        self.u: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: D = None
        self.w: D = None
        self.t: G = None
        self.o: F = None
        self.q: B = None
        self.s: G = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: B = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: F = None
        self.z: F = None
        self.t: G = None
        self.u: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: D = None
        self.w: D = None
        self.t: G = None
        self.o: F = None
        self.q: B = None
        self.s: G = None
        self.txt = txt

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

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