class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: B = None
        self.y: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: B = None
        self.w: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: E = None
        self.q: G = None
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: D = None
        self.r: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: D = None
        self.y: C = None
        self.u: C = None
        self.t: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: B = None
        self.w: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: E = None
        self.q: G = None
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: D = None
        self.r: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: D = None
        self.y: C = None
        self.u: C = None
        self.t: D = None
        self.txt = txt

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

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

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