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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: E = None
        self.z: A = None
        self.p: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: D = None
        self.w: B = None
        self.p: F = None
        self.r: H = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: G = None
        self.x: I = None
        self.t: I = None
        self.p: I = None
        self.v: G = None
        self.r: I = None
        self.y: A = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: C = None
        self.q: E = None
        self.v: E = None
        self.s: I = None
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: F = None
        self.w: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: E = None
        self.z: A = None
        self.p: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: D = None
        self.w: B = None
        self.p: F = None
        self.r: H = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: G = None
        self.x: I = None
        self.t: I = None
        self.p: I = None
        self.v: G = None
        self.r: I = None
        self.y: A = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: C = None
        self.q: E = None
        self.v: E = None
        self.s: I = None
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: F = None
        self.w: C = None
        self.txt = txt

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

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

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