class A:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: D = None
        self.r: H = None
        self.o: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: F = None
        self.x: F = None
        self.v: A = None
        self.y: H = None
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: H = None
        self.q: H = None
        self.z: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: B = None
        self.q: H = None
        self.x: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: G = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: A = None
        self.x: F = None
        self.p: F = None
        self.t: E = None
        self.o: C = None
        self.z: H = None
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: F = None
        self.x: F = None
        self.v: A = None
        self.y: H = None
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: H = None
        self.q: H = None
        self.z: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: B = None
        self.q: H = None
        self.x: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: G = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: A = None
        self.x: F = None
        self.p: F = None
        self.t: E = None
        self.o: C = None
        self.z: H = None
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

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