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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: C = None
        self.u: D = None
        self.r: C = None
        self.v: D = None
        self.w: H = None
        self.p: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: H = None
        self.p: C = None
        self.w: J = None
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.s: J = None
        self.u: B = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.u: G = None
        self.r: H = None
        self.s: J = None
        self.p: G = None
        self.y: A = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: B = None
        self.o: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: C = None
        self.u: D = None
        self.r: C = None
        self.v: D = None
        self.w: H = None
        self.p: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: H = None
        self.p: C = None
        self.w: J = None
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.s: J = None
        self.u: B = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.u: G = None
        self.r: H = None
        self.s: J = None
        self.p: G = None
        self.y: A = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: B = None
        self.o: H = None
        self.txt = txt

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

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