class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.x: C = None
        self.o: A = None
        self.r: F = None
        self.p: I = None
        self.z: I = None
        self.q: I = None
        self.t: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: G = None
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: H = None
        self.t: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: B = None
        self.s: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.x: C = None
        self.o: A = None
        self.r: F = None
        self.p: I = None
        self.z: I = None
        self.q: I = None
        self.t: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: G = None
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: H = None
        self.t: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: B = None
        self.s: E = None
        self.txt = txt

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

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