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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: E = None
        self.t: A = None
        self.r: A = None
        self.u: D = None
        self.v: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: A = None
        self.o: A = None
        self.r: H = None
        self.z: B = None
        self.s: G = None
        self.v: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: A = None
        self.y: A = None
        self.p: A = None
        self.x: B = None
        self.z: B = None
        self.u: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: E = None
        self.t: A = None
        self.r: A = None
        self.u: D = None
        self.v: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: A = None
        self.o: A = None
        self.r: H = None
        self.z: B = None
        self.s: G = None
        self.v: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: A = None
        self.y: A = None
        self.p: A = None
        self.x: B = None
        self.z: B = None
        self.u: D = None
        self.txt = txt

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

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