class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: D = None
        self.z: F = None
        self.v: G = None
        self.x: D = None
        self.txt = txt

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: A = None
        self.o: E = None
        self.s: D = None
        self.t: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: A = None
        self.o: E = None
        self.s: D = None
        self.t: F = None
        self.txt = txt

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

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