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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: B = None
        self.z: D = None
        self.s: E = None
        self.t: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: H = None
        self.r: I = None
        self.v: F = None
        self.w: A = None
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: H = None
        self.u: B = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: A = None
        self.v: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: F = None
        self.s: F = None
        self.txt = txt

l = A("l")
c = B("c")
m = C("m")
i = D("i")
f = E("f")
j = F("j")
d = G("d")
k = H("k")
a = I("a")

l.s = i
l.w = m
l.r = f
l.t = c
l.z = j
l.x = d
c.s = j
m.v = c
m.x = c
m.z = i
m.t = i
m.s = f
i.x = c
i.o = d
f.p = d
f.q = k
f.s = k
f.r = a
f.v = j
f.w = l
j.r = c
j.u = c
j.w = k
j.p = d
d.r = k
d.x = l
d.v = l
k.x = a
k.p = f
k.u = d
k.t = j
k.v = i
k.s = c
a.r = m
a.q = j
a.s = j
assert l.r.p.r.p.r.s.w.u.r.txt == "
class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: C = None
        self.r: E = None
        self.t: B = None
        self.z: F = None
        self.x: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: B = None
        self.z: D = None
        self.s: E = None
        self.t: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: H = None
        self.r: I = None
        self.v: F = None
        self.w: A = None
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: H = None
        self.u: B = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: A = None
        self.v: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: F = None
        self.s: F = None
        self.txt = txt

l = A("l")
c = B("c")
m = C("m")
i = D("i")
f = E("f")
j = F("j")
d = G("d")
k = H("k")
a = I("a")

l.s = i
l.w = m
l.r = f
l.t = c
l.z = j
l.x = d
c.s = j
m.v = c
m.x = c
m.z = i
m.t = i
m.s = f
i.x = c
i.o = d
f.p = d
f.q = k
f.s = k
f.r = a
f.v = j
f.w = l
j.r = c
j.u = c
j.w = k
j.p = d
d.r = k
d.x = l
d.v = l
k.x = a
k.p = f
k.u = d
k.t = j
k.v = i
k.s = c
a.r = m
a.q = j
a.s = j
assert l.r.p.r.p.r.s.w.u.r.txt == "k"