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

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: F = None
        self.t: B = None
        self.s: F = None
        self.y: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: G = None
        self.v: B = None
        self.x: F = None
        self.r: C = None
        self.u: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: B = None
        self.q: E = None
        self.v: A = None
        self.u: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: C = None
        self.x: B = None
        self.w: E = None
        self.s: H = None
        self.q: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: F = None
        self.t: B = None
        self.s: F = None
        self.y: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: G = None
        self.v: B = None
        self.x: F = None
        self.r: C = None
        self.u: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: B = None
        self.q: E = None
        self.v: A = None
        self.u: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: C = None
        self.x: B = None
        self.w: E = None
        self.s: H = None
        self.q: D = None
        self.txt = txt

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

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