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

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.o: F = None
        self.y: H = None
        self.r: H = None
        self.s: D = None
        self.v: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: F = None
        self.r: H = None
        self.o: E = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.o: F = None
        self.y: H = None
        self.r: H = None
        self.s: D = None
        self.v: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: F = None
        self.r: H = None
        self.o: E = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: D = None
        self.txt = txt

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

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