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

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: E = None
        self.p: B = None
        self.q: C = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: E = None
        self.q: E = None
        self.t: E = None
        self.x: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: E = None
        self.p: B = None
        self.q: C = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: E = None
        self.q: E = None
        self.t: E = None
        self.x: E = None
        self.txt = txt

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

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