class A:
    def __init__(self, txt: str):
        self.s: I = None
        self.w: B = None
        self.r: F = None
        self.u: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: G = None
        self.p: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: A = None
        self.q: H = None
        self.r: C = None
        self.y: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.z: G = None
        self.o: H = None
        self.r: B = None
        self.v: F = None
        self.u: D = None
        self.t: G = None
        self.y: B = None
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: H = None
        self.o: A = None
        self.q: B = None
        self.v: A = None
        self.x: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: I = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: G = None
        self.p: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: A = None
        self.q: H = None
        self.r: C = None
        self.y: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.z: G = None
        self.o: H = None
        self.r: B = None
        self.v: F = None
        self.u: D = None
        self.t: G = None
        self.y: B = None
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: H = None
        self.o: A = None
        self.q: B = None
        self.v: A = None
        self.x: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: I = None
        self.txt = txt

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

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

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