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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: G = None
        self.q: C = None
        self.w: C = None
        self.s: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: G = None
        self.t: H = None
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: D = None
        self.u: C = None
        self.r: C = None
        self.s: F = None
        self.x: F = None
        self.o: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: G = None
        self.q: C = None
        self.w: C = None
        self.s: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: G = None
        self.t: H = None
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: D = None
        self.u: C = None
        self.r: C = None
        self.s: F = None
        self.x: F = None
        self.o: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: B = None
        self.txt = txt

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

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

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