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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: B = None
        self.w: F = None
        self.t: A = None
        self.y: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: B = None
        self.v: B = None
        self.w: E = None
        self.q: F = None
        self.txt = txt

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

j = A("j")
a = B("a")
c = C("c")
k = D("k")
g = E("g")
i = F("i")
h = E("h")
f = C("f")
b = B("b")
m = D("m")

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: B = None
        self.w: F = None
        self.t: A = None
        self.y: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: B = None
        self.v: B = None
        self.w: E = None
        self.q: F = None
        self.txt = txt

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

j = A("j")
a = B("a")
c = C("c")
k = D("k")
g = E("g")
i = F("i")
h = E("h")
f = C("f")
b = B("b")
m = D("m")

j.y = a
a.z = k
a.s = b
a.w = i
a.t = j
a.y = j
c.w = m
k.o = a
g.u = h
g.w = h
g.o = a
g.v = b
g.q = i
i.z = f
i.o = c
h.u = g
h.w = g
h.o = b
h.v = b
h.q = i
f.w = m
b.z = k
b.s = a
b.w = i
b.t = j
b.y = j
m.o = b
assert c.w.o.s.y.y.s.z.o.txt == "a"