class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: D = None
        self.o: C = None
        self.v: C = None
        self.y: F = None
        self.w: D = None
        self.txt = txt

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

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

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

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

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

c = A("c")
i = B("i")
h = C("h")
f = D("f")
l = E("l")
d = F("d")
m = B("m")
k = F("k")
e = F("e")

c.t = e
c.r = f
c.w = f
c.o = h
c.v = h
c.y = k
i.w = l
i.t = l
h.u = m
h.x = m
h.q = l
h.r = c
h.w = k
f.u = h
f.q = h
l.r = h
l.o = k
l.t = m
l.v = m
l.y = i
d.x = f
d.u = f
d.p = e
m.w = l
m.t = l
k.x = f
k.u = f
k.p = d
e.x = f
e.u = f
e.p = d
assert f.q.x.t.v.t.y.w.txt == "
class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: D = None
        self.o: C = None
        self.v: C = None
        self.y: F = None
        self.w: D = None
        self.txt = txt

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

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

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

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

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

c = A("c")
i = B("i")
h = C("h")
f = D("f")
l = E("l")
d = F("d")
m = B("m")
k = F("k")
e = F("e")

c.t = e
c.r = f
c.w = f
c.o = h
c.v = h
c.y = k
i.w = l
i.t = l
h.u = m
h.x = m
h.q = l
h.r = c
h.w = k
f.u = h
f.q = h
l.r = h
l.o = k
l.t = m
l.v = m
l.y = i
d.x = f
d.u = f
d.p = e
m.w = l
m.t = l
k.x = f
k.u = f
k.p = d
e.x = f
e.u = f
e.p = d
assert f.q.x.t.v.t.y.w.txt == "l"