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

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

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

class D:
    def __init__(self, txt: str):
        self.r: J = None
        self.q: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: G = None
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: J = None
        self.z: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: F = None
        self.o: A = None
        self.r: F = None
        self.p: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: G = None
        self.p: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: J = None
        self.q: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: G = None
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: J = None
        self.z: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: F = None
        self.o: A = None
        self.r: F = None
        self.p: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: G = None
        self.p: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

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