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

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

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: F = None
        self.t: D = None
        self.x: G = None
        self.y: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: E = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: F = None
        self.t: D = None
        self.x: G = None
        self.y: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: E = None
        self.txt = txt

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

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

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

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