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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: G = None
        self.p: A = None
        self.u: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.v: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: F = None
        self.z: F = None
        self.s: E = None
        self.q: E = None
        self.v: C = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: I = None
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: I = None
        self.y: H = None
        self.w: I = None
        self.v: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: G = None
        self.p: A = None
        self.u: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.v: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: F = None
        self.z: F = None
        self.s: E = None
        self.q: E = None
        self.v: C = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: I = None
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: I = None
        self.y: H = None
        self.w: I = None
        self.v: F = None
        self.txt = txt

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

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