class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: F = None
        self.r: F = None
        self.s: A = None
        self.v: A = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: F = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: A = None
        self.t: A = None
        self.o: A = None
        self.txt = txt

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

d = A("d")
e = B("e")
a = C("a")
l = D("l")
m = E("m")
g = F("g")
f = A("f")

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: F = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: A = None
        self.t: A = None
        self.o: A = None
        self.txt = txt

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

d = A("d")
e = B("e")
a = C("a")
l = D("l")
m = E("m")
g = F("g")
f = A("f")

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