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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: D = None
        self.t: F = None
        self.u: F = None
        self.r: E = None
        self.txt = txt

a = A("a")
c = B("c")
k = C("k")
j = D("j")
i = E("i")
m = F("m")
g = G("g")
e = H("e")
b = C("b")

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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: D = None
        self.t: F = None
        self.u: F = None
        self.r: E = None
        self.txt = txt

a = A("a")
c = B("c")
k = C("k")
j = D("j")
i = E("i")
m = F("m")
g = G("g")
e = H("e")
b = C("b")

a.p = e
c.w = m
c.r = g
c.p = g
c.q = e
c.u = a
c.x = i
k.w = e
k.r = e
k.o = a
k.v = c
k.u = i
k.s = i
k.x = b
j.s = g
j.o = g
j.t = g
j.r = e
j.v = c
j.w = a
j.y = a
j.q = b
i.y = a
m.y = j
m.o = b
m.r = e
m.q = a
g.v = c
g.s = c
g.r = k
e.s = j
e.w = j
e.t = m
e.u = m
e.r = i
b.w = e
b.r = e
b.o = a
b.v = c
b.u = i
b.s = i
b.x = k
assert j.r.u.y.r.r.y.p.r.y.txt == "a"