class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: D = None
        self.v: G = None
        self.y: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: A = None
        self.x: D = None
        self.q: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: F = None
        self.y: A = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: E = None
        self.v: F = None
        self.y: F = None
        self.s: E = None
        self.o: C = None
        self.r: E = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: A = None
        self.x: D = None
        self.q: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: F = None
        self.y: A = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: E = None
        self.v: F = None
        self.y: F = None
        self.s: E = None
        self.o: C = None
        self.r: E = None
        self.txt = txt

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

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

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

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