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

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

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: E = None
        self.s: F = None
        self.o: F = None
        self.x: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: E = None
        self.q: F = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: E = None
        self.s: F = None
        self.o: F = None
        self.x: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: E = None
        self.q: F = None
        self.txt = txt

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

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

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

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