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

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

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.u: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.r: B = None
        self.u: B = None
        self.s: H = None
        self.v: F = None
        self.q: I = None
        self.p: F = None
        self.z: I = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: I = None
        self.u: C = None
        self.p: B = None
        self.t: H = None
        self.s: I = None
        self.q: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.r: D = None
        self.txt = txt

f = A("f")
m = B("m")
k = C("k")
e = D("e")
b = E("b")
n = F("n")
d = G("d")
l = H("l")
a = I("a")

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

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

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.u: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.r: B = None
        self.u: B = None
        self.s: H = None
        self.v: F = None
        self.q: I = None
        self.p: F = None
        self.z: I = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: I = None
        self.u: C = None
        self.p: B = None
        self.t: H = None
        self.s: I = None
        self.q: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.r: D = None
        self.txt = txt

f = A("f")
m = B("m")
k = C("k")
e = D("e")
b = E("b")
n = F("n")
d = G("d")
l = H("l")
a = I("a")

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