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

class B:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: B = None
        self.u: E = None
        self.t: F = None
        self.s: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: A = None
        self.s: A = None
        self.txt = txt

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

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

m = A("m")
k = B("k")
b = C("b")
h = D("h")
g = E("g")
c = F("c")
f = G("f")
i = A("i")
a = B("a")

m.z = a
m.v = i
m.y = i
m.r = c
k.v = a
k.q = a
k.u = g
k.t = c
k.s = c
b.u = i
b.r = i
b.x = i
b.o = c
h.z = c
g.p = b
g.x = i
g.s = i
c.s = k
c.p = f
c.y = h
f.y = k
f.u = g
f.o = b
f.x = b
f.v = a
i.z = k
i.v = m
i.y = m
i.r = c
a.v = k
a.q = k
a.u = g
a.t = c
a.s = c
assert m.r.y.z.s.u.p.txt == "
class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: A = None
        self.y: A = None
        self.r: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: B = None
        self.u: E = None
        self.t: F = None
        self.s: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: A = None
        self.s: A = None
        self.txt = txt

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

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

m = A("m")
k = B("k")
b = C("b")
h = D("h")
g = E("g")
c = F("c")
f = G("f")
i = A("i")
a = B("a")

m.z = a
m.v = i
m.y = i
m.r = c
k.v = a
k.q = a
k.u = g
k.t = c
k.s = c
b.u = i
b.r = i
b.x = i
b.o = c
h.z = c
g.p = b
g.x = i
g.s = i
c.s = k
c.p = f
c.y = h
f.y = k
f.u = g
f.o = b
f.x = b
f.v = a
i.z = k
i.v = m
i.y = m
i.r = c
a.v = k
a.q = k
a.u = g
a.t = c
a.s = c
assert m.r.y.z.s.u.p.txt == "b"