class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: C = None
        self.p: B = None
        self.r: B = None
        self.z: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: A = None
        self.u: C = None
        self.v: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: D = None
        self.y: D = None
        self.o: D = None
        self.u: B = None
        self.txt = txt

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

j.w = n
j.x = n
j.p = l
j.r = l
j.z = b
l.u = j
l.x = d
g.p = d
g.s = j
g.u = n
g.v = f
b.t = f
b.y = a
b.z = j
b.o = l
f.p = l
f.u = l
f.w = b
f.y = b
f.o = b
d.w = a
d.x = g
d.p = l
d.r = l
d.z = b
a.p = d
a.s = h
a.u = n
a.v = f
n.p = d
n.s = j
n.u = g
n.v = f
h.w = a
h.x = a
h.p = l
h.r = l
h.z = b
assert j.r.x.x.v.o.o.x.x.txt == "
class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: C = None
        self.p: B = None
        self.r: B = None
        self.z: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: A = None
        self.u: C = None
        self.v: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: D = None
        self.y: D = None
        self.o: D = None
        self.u: B = None
        self.txt = txt

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

j.w = n
j.x = n
j.p = l
j.r = l
j.z = b
l.u = j
l.x = d
g.p = d
g.s = j
g.u = n
g.v = f
b.t = f
b.y = a
b.z = j
b.o = l
f.p = l
f.u = l
f.w = b
f.y = b
f.o = b
d.w = a
d.x = g
d.p = l
d.r = l
d.z = b
a.p = d
a.s = h
a.u = n
a.v = f
n.p = d
n.s = j
n.u = g
n.v = f
h.w = a
h.x = a
h.p = l
h.r = l
h.z = b
assert j.r.x.x.v.o.o.x.x.txt == "g"