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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: B = None
        self.r: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: B = None
        self.x: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: B = None
        self.r: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: B = None
        self.x: E = None
        self.txt = txt

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

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

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