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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: H = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: D = None
        self.r: E = None
        self.y: G = None
        self.u: H = None
        self.s: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: H = None
        self.o: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: H = None
        self.o: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: F = None
        self.s: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: H = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: D = None
        self.r: E = None
        self.y: G = None
        self.u: H = None
        self.s: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: H = None
        self.o: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: H = None
        self.o: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: F = None
        self.s: G = None
        self.txt = txt

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

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