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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.v: G = None
        self.p: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: F = None
        self.v: F = None
        self.p: B = None
        self.z: A = None
        self.s: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: B = None
        self.t: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.v: G = None
        self.p: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: F = None
        self.v: F = None
        self.p: B = None
        self.z: A = None
        self.s: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: B = None
        self.t: B = None
        self.txt = txt

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

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

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