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

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

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: J = None
        self.y: G = None
        self.w: J = None
        self.p: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.s: E = None
        self.x: A = None
        self.w: G = None
        self.p: C = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: J = None
        self.p: H = None
        self.o: C = None
        self.y: C = None
        self.z: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: B = None
        self.z: G = None
        self.u: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: B = None
        self.w: E = None
        self.s: C = None
        self.txt = txt

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

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

i.x = d
k.s = d
b.x = d
b.y = d
b.t = a
b.w = a
b.p = h
g.t = m
g.s = n
g.x = i
g.w = d
g.p = b
g.v = b
n.t = b
n.o = b
n.y = b
n.v = a
n.p = m
n.z = d
c.p = k
d.r = c
m.o = n
m.t = k
m.z = d
m.u = d
h.x = i
h.u = k
h.w = n
h.s = b
a.t = b
assert a.t.p.w.z.r.p.s.r.p.txt == "
class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: J = None
        self.y: G = None
        self.w: J = None
        self.p: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.s: E = None
        self.x: A = None
        self.w: G = None
        self.p: C = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: J = None
        self.p: H = None
        self.o: C = None
        self.y: C = None
        self.z: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: B = None
        self.z: G = None
        self.u: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: B = None
        self.w: E = None
        self.s: C = None
        self.txt = txt

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

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

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