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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: A = None
        self.w: F = None
        self.r: D = None
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: F = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: A = None
        self.w: F = None
        self.r: D = None
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: F = None
        self.z: E = None
        self.txt = txt

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

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