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

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

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: E = None
        self.q: E = None
        self.p: E = None
        self.txt = txt

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

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

c = A("c")
i = B("i")
h = C("h")
e = D("e")
g = E("g")
l = F("l")
n = D("n")
d = E("d")

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: E = None
        self.q: E = None
        self.p: E = None
        self.txt = txt

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

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

c = A("c")
i = B("i")
h = C("h")
e = D("e")
g = E("g")
l = F("l")
n = D("n")
d = E("d")

c.x = l
c.s = h
c.o = e
c.u = e
c.q = i
i.o = e
i.y = e
i.q = c
h.q = c
h.r = d
h.u = i
h.o = i
h.w = g
e.v = i
e.u = g
e.q = g
e.p = g
g.o = h
l.t = h
l.p = h
l.v = n
l.s = g
n.v = i
n.u = d
n.q = d
n.p = d
d.o = h
assert e.p.o.o.y.txt == "e"