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

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: C = None
        self.t: A = None
        self.r: A = None
        self.v: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: B = None
        self.w: C = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: C = None
        self.t: A = None
        self.r: A = None
        self.v: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: B = None
        self.w: C = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

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

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

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