class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: D = None
        self.s: D = None
        self.z: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: D = None
        self.u: B = None
        self.r: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: B = None
        self.z: F = None
        self.r: A = None
        self.u: E = None
        self.t: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: F = None
        self.y: E = None
        self.t: E = None
        self.v: B = None
        self.w: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: D = None
        self.u: B = None
        self.r: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: B = None
        self.z: F = None
        self.r: A = None
        self.u: E = None
        self.t: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: F = None
        self.y: E = None
        self.t: E = None
        self.v: B = None
        self.w: D = None
        self.txt = txt

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

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