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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: B = None
        self.w: E = None
        self.x: B = None
        self.u: G = None
        self.p: B = None
        self.z: D = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: B = None
        self.w: E = None
        self.x: B = None
        self.u: G = None
        self.p: B = None
        self.z: D = None
        self.txt = txt

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

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

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

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