class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: F = None
        self.x: E = None
        self.q: B = None
        self.z: E = None
        self.v: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: E = None
        self.t: A = None
        self.x: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: B = None
        self.s: D = None
        self.w: E = None
        self.y: G = None
        self.u: E = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: H = None
        self.p: I = None
        self.x: F = None
        self.o: E = None
        self.t: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: B = None
        self.w: G = None
        self.s: A = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: E = None
        self.t: A = None
        self.x: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: B = None
        self.s: D = None
        self.w: E = None
        self.y: G = None
        self.u: E = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: H = None
        self.p: I = None
        self.x: F = None
        self.o: E = None
        self.t: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: B = None
        self.w: G = None
        self.s: A = None
        self.txt = txt

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

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

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