class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.p: F = None
        self.u: B = None
        self.y: F = None
        self.z: G = None
        self.o: F = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: C = None
        self.x: F = None
        self.p: F = None
        self.q: C = None
        self.o: C = None
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: G = None
        self.s: A = None
        self.x: G = None
        self.o: B = None
        self.r: H = None
        self.u: B = None
        self.p: F = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: C = None
        self.x: F = None
        self.p: F = None
        self.q: C = None
        self.o: C = None
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: G = None
        self.s: A = None
        self.x: G = None
        self.o: B = None
        self.r: H = None
        self.u: B = None
        self.p: F = None
        self.txt = txt

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

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