class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: I = None
        self.s: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.t: I = None
        self.u: H = None
        self.v: E = None
        self.p: H = None
        self.o: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.s: B = None
        self.q: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: E = None
        self.y: A = None
        self.x: B = None
        self.t: D = None
        self.u: B = None
        self.o: A = None
        self.q: E = None
        self.v: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.t: I = None
        self.u: H = None
        self.v: E = None
        self.p: H = None
        self.o: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.s: B = None
        self.q: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: E = None
        self.y: A = None
        self.x: B = None
        self.t: D = None
        self.u: B = None
        self.o: A = None
        self.q: E = None
        self.v: E = None
        self.txt = txt

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

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