class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: F = None
        self.s: H = None
        self.q: E = None
        self.v: E = None
        self.w: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: E = None
        self.s: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.r: E = None
        self.x: D = None
        self.s: I = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: F = None
        self.s: H = None
        self.q: E = None
        self.v: E = None
        self.w: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: E = None
        self.s: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.r: E = None
        self.x: D = None
        self.s: I = None
        self.txt = txt

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

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

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