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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: F = None
        self.r: E = None
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: D = None
        self.s: D = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: F = None
        self.r: E = None
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: D = None
        self.s: D = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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