class A:
    def __init__(self, txt: str):
        self.t: I = None
        self.o: C = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: H = None
        self.z: D = None
        self.u: C = None
        self.x: A = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: H = None
        self.z: D = None
        self.u: C = None
        self.x: A = None
        self.txt = txt

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

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

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

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