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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: E = None
        self.y: A = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.o: A = None
        self.s: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: E = None
        self.y: A = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.o: A = None
        self.s: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

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