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

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

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

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

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

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

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

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

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

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

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

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

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

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

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