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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: C = None
        self.q: C = None
        self.y: F = None
        self.s: F = None
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: E = None
        self.x: B = None
        self.w: E = None
        self.r: A = None
        self.p: E = None
        self.t: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: F = None
        self.s: D = None
        self.txt = txt

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

d.p = a
d.s = a
i.u = d
i.y = k
i.t = j
i.z = j
i.w = j
i.p = j
i.x = f
i.s = n
f.t = k
k.x = l
k.p = l
k.q = l
k.s = f
k.y = i
l.r = f
l.w = f
l.q = f
l.y = n
l.s = n
l.x = e
n.r = k
a.w = j
j.z = n
j.y = l
j.w = l
j.p = l
j.t = l
j.x = i
j.r = e
m.t = j
m.v = n
m.s = k
e.p = a
e.s = a
assert m.v.r.s.t.txt == "
class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: C = None
        self.q: C = None
        self.y: F = None
        self.s: F = None
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: E = None
        self.x: B = None
        self.w: E = None
        self.r: A = None
        self.p: E = None
        self.t: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: F = None
        self.s: D = None
        self.txt = txt

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

d.p = a
d.s = a
i.u = d
i.y = k
i.t = j
i.z = j
i.w = j
i.p = j
i.x = f
i.s = n
f.t = k
k.x = l
k.p = l
k.q = l
k.s = f
k.y = i
l.r = f
l.w = f
l.q = f
l.y = n
l.s = n
l.x = e
n.r = k
a.w = j
j.z = n
j.y = l
j.w = l
j.p = l
j.t = l
j.x = i
j.r = e
m.t = j
m.v = n
m.s = k
e.p = a
e.s = a
assert m.v.r.s.t.txt == "k"