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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: H = None
        self.z: I = None
        self.w: D = None
        self.y: A = None
        self.x: C = None
        self.r: I = None
        self.s: I = None
        self.o: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: H = None
        self.x: C = None
        self.y: I = None
        self.w: F = None
        self.z: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: E = None
        self.p: B = None
        self.r: D = None
        self.y: H = None
        self.o: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: D = None
        self.s: C = None
        self.v: F = None
        self.t: F = None
        self.u: D = None
        self.w: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: A = None
        self.v: C = None
        self.u: G = None
        self.t: B = None
        self.p: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: H = None
        self.z: I = None
        self.w: D = None
        self.y: A = None
        self.x: C = None
        self.r: I = None
        self.s: I = None
        self.o: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: H = None
        self.x: C = None
        self.y: I = None
        self.w: F = None
        self.z: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: E = None
        self.p: B = None
        self.r: D = None
        self.y: H = None
        self.o: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: D = None
        self.s: C = None
        self.v: F = None
        self.t: F = None
        self.u: D = None
        self.w: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: A = None
        self.v: C = None
        self.u: G = None
        self.t: B = None
        self.p: D = None
        self.txt = txt

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

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