class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: F = None
        self.y: A = None
        self.p: A = None
        self.t: F = None
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: H = None
        self.r: E = None
        self.z: G = None
        self.q: C = None
        self.t: H = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: G = None
        self.q: A = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: B = None
        self.z: A = None
        self.x: B = None
        self.p: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: E = None
        self.p: A = None
        self.o: C = None
        self.s: D = None
        self.txt = txt

d = A("d")
e = B("e")
j = C("j")
a = D("a")
i = E("i")
g = F("g")
b = G("b")
h = H("h")
n = G("n")

d.r = j
e.v = a
e.r = a
e.q = a
e.p = j
e.y = h
e.t = d
e.u = b
j.z = d
j.y = d
j.p = d
j.v = g
j.t = g
j.o = e
a.p = g
a.s = g
a.v = h
a.t = h
a.r = i
a.z = b
a.q = j
i.x = e
i.u = n
i.q = d
i.v = d
g.v = i
g.s = e
g.x = e
g.z = d
g.p = h
b.t = a
b.v = a
b.u = d
b.q = d
b.o = g
b.z = j
b.x = i
h.t = e
h.q = i
h.p = d
h.o = j
h.s = a
n.t = a
n.v = a
n.u = d
n.q = d
n.o = g
n.z = j
n.x = i
assert a.p.s.r.v.t.txt == "
class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: F = None
        self.y: A = None
        self.p: A = None
        self.t: F = None
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: H = None
        self.r: E = None
        self.z: G = None
        self.q: C = None
        self.t: H = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: G = None
        self.q: A = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: B = None
        self.z: A = None
        self.x: B = None
        self.p: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: E = None
        self.p: A = None
        self.o: C = None
        self.s: D = None
        self.txt = txt

d = A("d")
e = B("e")
j = C("j")
a = D("a")
i = E("i")
g = F("g")
b = G("b")
h = H("h")
n = G("n")

d.r = j
e.v = a
e.r = a
e.q = a
e.p = j
e.y = h
e.t = d
e.u = b
j.z = d
j.y = d
j.p = d
j.v = g
j.t = g
j.o = e
a.p = g
a.s = g
a.v = h
a.t = h
a.r = i
a.z = b
a.q = j
i.x = e
i.u = n
i.q = d
i.v = d
g.v = i
g.s = e
g.x = e
g.z = d
g.p = h
b.t = a
b.v = a
b.u = d
b.q = d
b.o = g
b.z = j
b.x = i
h.t = e
h.q = i
h.p = d
h.o = j
h.s = a
n.t = a
n.v = a
n.u = d
n.q = d
n.o = g
n.z = j
n.x = i
assert a.p.s.r.v.t.txt == "e"