class A:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: F = None
        self.x: F = None
        self.u: A = None
        self.y: A = None
        self.p: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: G = None
        self.v: A = None
        self.w: F = None
        self.u: F = None
        self.t: C = None
        self.p: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: G = None
        self.v: A = None
        self.w: F = None
        self.u: F = None
        self.t: C = None
        self.p: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

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

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

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

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

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