class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: D = None
        self.x: E = None
        self.v: H = None
        self.u: E = None
        self.y: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.r: A = None
        self.u: A = None
        self.z: G = None
        self.v: G = None
        self.s: A = None
        self.w: E = None
        self.q: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: B = None
        self.s: B = None
        self.w: A = None
        self.u: D = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.r: A = None
        self.u: A = None
        self.z: G = None
        self.v: G = None
        self.s: A = None
        self.w: E = None
        self.q: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: B = None
        self.s: B = None
        self.w: A = None
        self.u: D = None
        self.txt = txt

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

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

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

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