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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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