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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: A = None
        self.v: F = None
        self.q: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: A = None
        self.v: F = None
        self.q: B = None
        self.txt = txt

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

e.p = l
e.v = g
e.q = g
e.u = g
e.x = j
e.y = h
l.v = d
j.y = e
j.w = d
j.r = h
h.t = e
h.w = l
h.o = i
h.x = g
g.r = j
g.o = c
i.v = h
i.u = g
c.w = h
c.z = h
c.q = j
c.x = j
c.r = d
c.v = g
c.t = g
c.u = l
d.y = j
d.w = e
d.v = i
d.q = l
assert e.y.t.x.y.q.r.txt == "j"