class A:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: F = None
        self.o: E = None
        self.txt = txt

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

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

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

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

e.y = m
g.z = e
g.u = i
g.o = j
g.x = m
g.w = n
g.q = n
n.u = m
n.y = f
n.o = i
j.t = g
j.w = n
j.x = n
i.x = g
i.o = g
i.t = e
f.s = e
f.q = j
f.v = c
f.x = g
f.u = m
a.s = m
a.q = j
a.v = f
a.x = g
a.u = e
c.s = m
c.q = j
c.v = a
c.x = g
c.u = e
m.y = e
assert a.u.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: F = None
        self.o: E = None
        self.txt = txt

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

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

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

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

e.y = m
g.z = e
g.u = i
g.o = j
g.x = m
g.w = n
g.q = n
n.u = m
n.y = f
n.o = i
j.t = g
j.w = n
j.x = n
i.x = g
i.o = g
i.t = e
f.s = e
f.q = j
f.v = c
f.x = g
f.u = m
a.s = m
a.q = j
a.v = f
a.x = g
a.u = e
c.s = m
c.q = j
c.v = a
c.x = g
c.u = e
m.y = e
assert a.u.y.y.txt == "e"