class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: E = None
        self.z: A = None
        self.y: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: A = None
        self.r: A = None
        self.x: C = None
        self.txt = txt

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

b = A("b")
g = B("g")
n = C("n")
e = D("e")
a = E("a")
i = E("i")
f = B("f")
j = E("j")
h = A("h")

b.o = f
b.x = j
b.z = h
b.y = i
g.s = f
g.y = e
n.x = h
e.y = i
e.t = h
e.r = b
e.x = n
a.p = n
a.t = n
a.v = n
a.x = j
i.p = n
i.t = n
i.v = n
i.x = a
f.s = g
f.y = e
j.p = n
j.t = n
j.v = n
j.x = a
h.o = g
h.x = j
h.y = j
h.z = b
assert f.y.y.p.x.o.y.y.t.x.txt == "
class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: E = None
        self.z: A = None
        self.y: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: A = None
        self.r: A = None
        self.x: C = None
        self.txt = txt

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

b = A("b")
g = B("g")
n = C("n")
e = D("e")
a = E("a")
i = E("i")
f = B("f")
j = E("j")
h = A("h")

b.o = f
b.x = j
b.z = h
b.y = i
g.s = f
g.y = e
n.x = h
e.y = i
e.t = h
e.r = b
e.x = n
a.p = n
a.t = n
a.v = n
a.x = j
i.p = n
i.t = n
i.v = n
i.x = a
f.s = g
f.y = e
j.p = n
j.t = n
j.v = n
j.x = a
h.o = g
h.x = j
h.y = j
h.z = b
assert f.y.y.p.x.o.y.y.t.x.txt == "h"