class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: E = None
        self.q: H = None
        self.u: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: I = None
        self.r: F = None
        self.o: E = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: C = None
        self.t: I = None
        self.p: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: F = None
        self.v: D = None
        self.y: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: C = None
        self.o: I = None
        self.q: C = None
        self.t: G = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: I = None
        self.r: F = None
        self.o: E = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: C = None
        self.t: I = None
        self.p: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: F = None
        self.v: D = None
        self.y: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: C = None
        self.o: I = None
        self.q: C = None
        self.t: G = None
        self.txt = txt

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

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

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

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

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