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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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

l.y = n
l.p = i
l.q = h
l.r = c
l.w = m
m.x = d
m.z = e
h.w = a
a.z = e
a.t = n
a.q = l
n.y = c
j.z = m
j.v = h
d.y = c
i.x = n
i.z = a
e.z = a
e.t = n
e.q = l
c.z = i
c.v = h
assert e.z.q.p.x.y.txt == "c"