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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: D = None
        self.y: H = None
        self.p: D = None
        self.v: A = None
        self.x: J = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: C = None
        self.v: J = None
        self.o: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: A = None
        self.u: J = None
        self.x: C = None
        self.r: J = None
        self.txt = txt

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

i = A("i")
m = B("m")
d = C("d")
b = D("b")
c = E("c")
g = F("g")
k = G("k")
e = H("e")
l = I("l")
f = J("f")

i.p = e
i.z = e
i.v = f
i.w = l
i.y = l
m.t = g
m.v = f
d.z = k
d.r = b
d.p = b
d.y = e
d.v = i
d.x = f
b.r = i
b.q = i
b.o = i
b.u = e
b.s = d
b.t = g
c.x = l
c.s = g
c.y = m
g.w = m
g.x = c
g.p = c
g.q = b
g.u = f
g.s = l
g.r = i
g.v = e
g.o = k
k.x = e
k.w = d
e.s = d
e.y = d
e.o = d
e.v = f
l.q = g
l.y = i
l.u = f
l.r = f
l.x = d
f.x = k
assert g.s.q.x.s.x.y.t.v.v.x.txt == "
class A:
    def __init__(self, txt: str):
        self.p: H = None
        self.v: J = None
        self.z: H = None
        self.w: I = None
        self.y: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: D = None
        self.y: H = None
        self.p: D = None
        self.v: A = None
        self.x: J = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: C = None
        self.v: J = None
        self.o: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: A = None
        self.u: J = None
        self.x: C = None
        self.r: J = None
        self.txt = txt

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

i = A("i")
m = B("m")
d = C("d")
b = D("b")
c = E("c")
g = F("g")
k = G("k")
e = H("e")
l = I("l")
f = J("f")

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