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

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

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: A = None
        self.s: A = None
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: A = None
        self.w: F = None
        self.p: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: A = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: F = None
        self.x: C = None
        self.o: F = None
        self.r: D = None
        self.s: F = None
        self.p: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: C = None
        self.t: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: A = None
        self.s: A = None
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: A = None
        self.w: F = None
        self.p: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: A = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: F = None
        self.x: C = None
        self.o: F = None
        self.r: D = None
        self.s: F = None
        self.p: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: C = None
        self.t: C = None
        self.txt = txt

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

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