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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: C = None
        self.r: H = None
        self.t: C = None
        self.u: F = None
        self.y: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: G = None
        self.v: B = None
        self.u: B = None
        self.r: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: C = None
        self.r: H = None
        self.t: C = None
        self.u: F = None
        self.y: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: G = None
        self.v: B = None
        self.u: B = None
        self.r: G = None
        self.txt = txt

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

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