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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: G = None
        self.o: F = None
        self.w: C = None
        self.s: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: D = None
        self.v: B = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: G = None
        self.o: F = None
        self.w: C = None
        self.s: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: D = None
        self.v: B = None
        self.w: A = None
        self.txt = txt

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

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