class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: E = None
        self.y: D = None
        self.o: E = None
        self.w: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: C = None
        self.q: F = None
        self.w: C = None
        self.r: G = None
        self.s: H = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: D = None
        self.p: A = None
        self.u: G = None
        self.w: B = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: A = None
        self.o: G = None
        self.t: E = None
        self.w: G = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: G = None
        self.r: B = None
        self.s: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: C = None
        self.q: F = None
        self.w: C = None
        self.r: G = None
        self.s: H = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: D = None
        self.p: A = None
        self.u: G = None
        self.w: B = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: A = None
        self.o: G = None
        self.t: E = None
        self.w: G = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: G = None
        self.r: B = None
        self.s: G = None
        self.txt = txt

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

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