class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: D = None
        self.z: B = None
        self.s: D = None
        self.u: D = None
        self.q: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: C = None
        self.y: C = None
        self.r: C = None
        self.x: B = None
        self.t: F = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: F = None
        self.s: D = None
        self.q: G = None
        self.v: E = None
        self.u: C = None
        self.t: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: C = None
        self.y: C = None
        self.r: C = None
        self.x: B = None
        self.t: F = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: F = None
        self.s: D = None
        self.q: G = None
        self.v: E = None
        self.u: C = None
        self.t: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

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

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