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

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

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: I = None
        self.s: A = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: B = None
        self.x: G = None
        self.v: F = None
        self.y: F = None
        self.u: B = None
        self.o: B = None
        self.z: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: I = None
        self.s: A = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: B = None
        self.x: G = None
        self.v: F = None
        self.y: F = None
        self.u: B = None
        self.o: B = None
        self.z: G = None
        self.txt = txt

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

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