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

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

class C:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: B = None
        self.p: B = None
        self.x: D = None
        self.q: D = None
        self.o: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: B = None
        self.s: D = None
        self.t: F = None
        self.z: C = None
        self.v: C = None
        self.txt = txt

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

f = A("f")
e = B("e")
j = C("j")
g = D("g")
l = E("l")
a = F("a")
c = C("c")

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

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

class C:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: B = None
        self.p: B = None
        self.x: D = None
        self.q: D = None
        self.o: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: B = None
        self.s: D = None
        self.t: F = None
        self.z: C = None
        self.v: C = None
        self.txt = txt

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

f = A("f")
e = B("e")
j = C("j")
g = D("g")
l = E("l")
a = F("a")
c = C("c")

f.w = l
f.s = e
e.v = f
e.s = l
e.w = g
j.z = c
j.s = e
j.p = e
j.x = g
j.q = g
j.o = a
g.t = e
g.y = f
g.r = l
g.o = l
l.q = g
l.s = g
l.x = e
l.t = a
l.z = c
l.v = j
a.s = c
a.z = e
a.q = e
a.r = l
c.z = j
c.s = e
c.p = e
c.x = g
c.q = g
c.o = a
assert c.s.w.y.s.w.txt == "g"