class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: G = None
        self.r: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: E = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: E = None
        self.x: F = None
        self.v: A = None
        self.o: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: A = None
        self.o: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: E = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: E = None
        self.x: F = None
        self.v: A = None
        self.o: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: A = None
        self.o: A = None
        self.txt = txt

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

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

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