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

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

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

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

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

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

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

b = A("b")
f = B("f")
l = C("l")
c = D("c")
a = E("a")
h = F("h")
e = G("e")
d = B("d")

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

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

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

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

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

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

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

b = A("b")
f = B("f")
l = C("l")
c = D("c")
a = E("a")
h = F("h")
e = G("e")
d = B("d")

b.r = a
b.z = c
b.u = c
b.p = e
b.q = d
f.x = b
f.t = c
f.r = a
f.z = e
f.v = l
f.y = h
l.s = e
l.u = d
l.x = a
l.p = a
c.o = e
c.x = e
c.r = e
c.z = l
c.w = l
c.q = l
c.y = h
a.t = b
a.z = h
h.y = f
h.q = e
h.u = b
h.r = b
h.v = a
h.o = a
e.u = c
e.o = c
e.s = l
e.p = l
e.z = b
d.x = b
d.t = c
d.r = a
d.z = e
d.v = l
d.y = h
assert d.z.z.r.z.q.z.p.o.txt == "c"