class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: E = None
        self.r: C = None
        self.z: D = None
        self.t: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: A = None
        self.r: A = None
        self.s: F = None
        self.o: G = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.p: C = None
        self.r: E = None
        self.s: A = None
        self.x: D = None
        self.t: E = None
        self.v: D = None
        self.y: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: D = None
        self.txt = txt

j = A("j")
m = B("m")
n = C("n")
f = D("f")
d = E("d")
c = F("c")
e = G("e")
g = H("g")
k = I("k")

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

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: A = None
        self.r: A = None
        self.s: F = None
        self.o: G = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.p: C = None
        self.r: E = None
        self.s: A = None
        self.x: D = None
        self.t: E = None
        self.v: D = None
        self.y: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: D = None
        self.txt = txt

j = A("j")
m = B("m")
n = C("n")
f = D("f")
d = E("d")
c = F("c")
e = G("e")
g = H("g")
k = I("k")

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