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

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: E = None
        self.y: G = None
        self.p: A = None
        self.x: G = None
        self.w: I = None
        self.o: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: H = None
        self.q: B = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: J = None
        self.y: C = None
        self.x: J = None
        self.t: G = None
        self.z: D = None
        self.v: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: E = None
        self.y: G = None
        self.p: A = None
        self.x: G = None
        self.w: I = None
        self.o: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: H = None
        self.q: B = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: J = None
        self.y: C = None
        self.x: J = None
        self.t: G = None
        self.z: D = None
        self.v: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: D = None
        self.txt = txt

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

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